package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysMemberFinanceRecordMapper;
import com.ruoyi.system.domain.SysMemberFinanceRecord;
import com.ruoyi.system.service.ISysMemberFinanceRecordService;

/**
 * 会员余额记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-14
 */
@Service
public class SysMemberFinanceRecordServiceImpl implements ISysMemberFinanceRecordService 
{
    @Autowired
    private SysMemberFinanceRecordMapper sysMemberFinanceRecordMapper;

    /**
     * 查询会员余额记录
     * 
     * @param id 会员余额记录主键
     * @return 会员余额记录
     */
    @Override
    public SysMemberFinanceRecord selectSysMemberFinanceRecordById(String id)
    {
        return sysMemberFinanceRecordMapper.selectSysMemberFinanceRecordById(id);
    }

    /**
     * 查询会员余额记录列表
     * 
     * @param sysMemberFinanceRecord 会员余额记录
     * @return 会员余额记录
     */
    @Override
    public List<SysMemberFinanceRecord> selectSysMemberFinanceRecordList(SysMemberFinanceRecord sysMemberFinanceRecord)
    {
        return sysMemberFinanceRecordMapper.selectSysMemberFinanceRecordList(sysMemberFinanceRecord);
    }

    /**
     * 新增会员余额记录
     * 
     * @param sysMemberFinanceRecord 会员余额记录
     * @return 结果
     */
    @Override
    public int insertSysMemberFinanceRecord(SysMemberFinanceRecord sysMemberFinanceRecord)
    {
        sysMemberFinanceRecord.setCreateTime(DateUtils.getNowDate());
        return sysMemberFinanceRecordMapper.insertSysMemberFinanceRecord(sysMemberFinanceRecord);
    }

    /**
     * 修改会员余额记录
     * 
     * @param sysMemberFinanceRecord 会员余额记录
     * @return 结果
     */
    @Override
    public int updateSysMemberFinanceRecord(SysMemberFinanceRecord sysMemberFinanceRecord)
    {
        sysMemberFinanceRecord.setUpdateTime(DateUtils.getNowDate());
        return sysMemberFinanceRecordMapper.updateSysMemberFinanceRecord(sysMemberFinanceRecord);
    }

    /**
     * 批量删除会员余额记录
     * 
     * @param ids 需要删除的会员余额记录主键
     * @return 结果
     */
    @Override
    public int deleteSysMemberFinanceRecordByIds(String[] ids)
    {
        return sysMemberFinanceRecordMapper.deleteSysMemberFinanceRecordByIds(ids);
    }

    /**
     * 删除会员余额记录信息
     * 
     * @param id 会员余额记录主键
     * @return 结果
     */
    @Override
    public int deleteSysMemberFinanceRecordById(String id)
    {
        return sysMemberFinanceRecordMapper.deleteSysMemberFinanceRecordById(id);
    }
}
